home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Directorty Opus 5 - Magellan
/
Opus 5 - Magellan.iso
/
Extras
/
D51_NARexx
/
CDO.dopus5
next >
Wrap
Text File
|
1995-08-18
|
2KB
|
45 lines
/* CDO for Directory Opus 5
By Leo Davidson ("Nudel", Pot-Noodle/Gods'Gift Utilities)
$VER: CDO.dopus5 1.3 (18.8.95)
Note: Please don't confuse this with the OCD script!
Note: "CDOpus" is an assembler version of this script, with extra features.
When run from a Shell, will echo the path used by the SOURCE Lister.
Using an alias, this can be used as a command which CD's to the path
used by the SOURCE lister.
To set up the command "CDO", add the following to your s:shell-startup:
-------------------------------------------------------------------------------
Alias CDO "CD *"*`rx DOpus5:ARexx/cdo.dopus5*`*""
-------------------------------------------------------------------------------
v1.01 -> v1.02 - Now makes sure there is a source lister. (Ahem)
Now makes sure the DOPUS.1 port exists. (Double-Ahem)
v1.02 -> v1.3 - Now uses Show() instead of ShowList(). (Thanks Stoebi)
Style Guide compliant version numbering and $VER string.
*/
options results
options FAILAT 99
signal on syntax;signal on ioerr
If Show("P","DOPUS.1") Then
address "DOPUS.1" /* Assumes there's only one copy. */
Else
Exit /* If no DOPUS.1 port, exit */
lister query source stem source_handle. /* Get handle of SOURCE lister(s). */
IF source_handle.count = 0 | source_handle.count = "SOURCE_HANDLE.COUNT" Then Do
dopus front
dopus request '"You must have a SOURCE lister!" OK'
EXIT
End
Lister Query source_handle.0 Path /* Get its path. */
Say Strip(RESULT,B,'"') /* Echo result -> input of CD cmd. */
Syntax:;IoErr:
EXIT